feat(desktop): add Gemini CLI as a tier-2 preset harness - #3520
Conversation
Adds Gemini CLI to the built-in preset harness catalog. Gemini exposes a native ACP mode via 'gemini --acp' — no adapter needed, no vendor CLI underlying_cli linkage required. Ships against the existing preset infrastructure (PresetHarness struct + discovery/presets.rs module extracted in block#3225). Zero refactor surface — a single 9-line additive entry into PRESET_HARNESSES. Signed-off-by: JPeetz <[email protected]>
1b296f4 to
a6f9235
Compare
|
Force-pushed a rewrite. Original branch was 220-line refactor sitting on top of an outdated Rewrote the branch as a minimal additive commit against current The functional change is unchanged: adds this harness to the built-in tier-2 preset catalog. It uses the same ACP-mode invocation pattern the original PR proposed. |
Summary
gemini --acp, native ACP support, no adapter) as a tier-2PresetHarnessentry — matches the shape ofopencode/kimi/cursor.PRESET_HARNESSES, and its two accessor fns) out ofdiscovery.rsinto a new sibling modulediscovery/presets.rs.discovery.rswas already past the desktop file-size ratchet, so a bare addition would have failedjust desktop-check. No behavior change from the split itself.Test plan
cargo fmt --checkcleancargo clippy --all-targets -- -D warningscleannode desktop/scripts/check-file-sizes.mjspasses (discovery.rs down to 1648 lines, new presets.rs at 234)cargo test --manifest-path desktop/src-tauri/Cargo.toml discovery— 172 passedpnpm exec biome checkclean on modified frontend filesnode desktop/scripts/check-px-text.mjscleangemini --acp— spawned the real CLI (gemini-cli@0.53.0) locally, sent a JSON-RPCinitializerequest over stdio matching the exact paramsbuzz-acpsends, got back a well-formed response: agent negotiated down toprotocolVersion: 1, returnedagentInfo(gemini-cliv0.53.0),agentCapabilities(loadSession, image/audio/embeddedContext prompts, MCP http/sse), andauthMethodsincludinggemini-api-key. Confirmscommand: "gemini", args: ["--acp"]is correct and the harness starts and speaks ACP as configured. (Auth/prompt flow beyondinitializenot exercised — out of scope for this spike.)